class SecurityFilters {
	def filters = {
		doLogin(controller:'*' , action:'*' ){
			before = {
				if (!controllerName)
					return true
				def allowedActions = [
					'show' ,
					'index' ,
					'list' ,
					'login' ,
					'validate',
					'ajaxUpdateEventMessages',
					'searchAJAX'
				]
				if (!session.user && !allowedActions.contains(actionName)){
					redirect(controller:'appUser' , action:'login' ,
							params:['cName' : controllerName, 'aName' :actionName])
					return false
				}
			}
		}
	}
}
